<template>
   <Card shadow>
      <div slot="extra">
        <span>上限：60</span>
        <span>下限：20</span>
      </div>
      <div class="content">
        <div class="info">
          <div class="Micon bg1">
            <img class="img1" src="./images/equipstatus.png" alt="">
          </div>
          <div class="basic">
            <p class="label">当天累计使用能源：</p>
            <p class="value">{{data.accumulatedEnergy.number}}</p>
          </div>
        </div>
        <div class="info">
          <div class="Micon bg2">
            <img class="img2" src="./images/warntime.png" alt="">
          </div>
          <div class="basic">
            <p class="label">设备能源消耗同比：</p>
            <p class="value">
              {{data.energySameRadio.number}}%
              <span v-if="data.energySameRadio.isAdd" style="color: red;">⬆</span>
              <span v-else style="color: green;">⬇</span>
            </p>
          </div>
        </div>
        <div class="info">
          <div class="Micon bg3">
            <img class="img3" src="./images/runtime.png" alt="">
          </div>
          <div class="basic">
            <p class="label">设备能源消耗环比：</p>
            <p class="value">
              {{data.energyChainRadio.number}}%
              <span v-if="data.energyChainRadio.isAdd" style="color: red;">⬆</span>
              <span v-else style="color: green;">⬇</span>
            </p>
          </div>
        </div>
      </div>
  </Card>
</template>

<script>
export default {
    props: {
      data: {
        default: () => {}
      }
    },
}
</script>

<style lang="less" scoped>
.ivu-card {
  width:100%;
  height:100%;
  ::v-deep .ivu-card-body {
    height: 90% !important;
    position: relative;
    top: 20px;
  }
  ::v-deep .ivu-card-extra {
    font-size: 12px;
    span {
      margin-right: 10px;
      padding: 2px 5px;
      background-image: linear-gradient(to right, #F46564, #FF7A45);
      border-radius: 10px;
      color: #fff;
      opacity: 0.8;
      &:last-child {
        background-image: linear-gradient(to right, #7263BA, #006FBE);
      }
    }
  }
  .content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    .info {
      display: flex;
      justify-content: space-evenly;
      align-items: center;
      width: 100%;
      .bg1 {
        background-color: #FDEFE9;
      }
      .bg2 {
        background-color: #EFF1FE;
      }
      .bg3 {
        background-color: #E6F6FF;
      }
      .Micon {
        margin-right: 10px;
        width: 40px;
        height: 40px;
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 20px;
        .img1 {
          width: 25px;
          height: 25px;
        }
        .img2 {
          width: 20px;
          height: 20px;
        }
        .img3 {
          width: 25px;
          height: 25px;
        }
      }
      .basic {
        color: #A5A5A5;
        .label {
          font-size: 12px;
        }
        .value {
          font-size: 16px;
          color: #000;
        }
      }
    }
  }
}
</style>